namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a LinearSplineComponent class.
    /// </summary>
    public interface ILinearSplineComponent
    {
        /// <summary>
        /// Gets or sets the linear function of the splinepart.
        /// </summary>
        /// <value>The linear function of the splinepart.</value>
        LinearFunction LinearFunction { get; set; }

        /// <summary>
        /// Gets or sets the start point of the splinepart.
        /// </summary>
        /// <value>The startpoint of the splinepart.</value>
        Point2D Start { get; set; }

        /// <summary>
        /// Gets or sets the endpoint of the splinepart.
        /// </summary>
        /// <value>The endpoint of the splinepart.</value>
        Point2D End { get; set; }

        /// <summary>
        /// Copies the current instance of a LinearSplineComponent.
        /// </summary>
        /// <returns>A copy of the current instance.</returns>
        LinearSplineComponent Copy();

        /// <summary>
        /// Determines whether [the current LinearSplineComponent is defined for] [the specified x value].
        /// </summary>
        /// <param name="x">The x value to check.</param>
        /// <returns>
        /// 	<c>true</c> if [the current LinearSplineComponent is defined for] [the specified x value]; otherwise, <c>false</c>.
        /// </returns>
        bool IsDefinedFor(double x);

        /// <summary>
        /// Compares the current instance to another LinearSplineComponent.
        /// </summary>
        /// <param name="compare">The LinearSplineComponent to compare.</param>
        /// <returns>True if the components are even otherwise, false.</returns>
        bool CompareTo(LinearSplineComponent compare);
    }
}